package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CgTecnicoCaso generated by hbm2java
 */
@Entity
@Table(name = "CG_TECNICO_CASO", schema = "UPET")
public class CgTecnicoCaso implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6793465086361175021L;
	private CgTecnicoCasoId id;
	private CgTecnico cgTecnico;
	private TbUnidad tbUnidad;
	private CgCaso cgCaso;
	private CgEtapa cgEtapa;
	private Date fiasignacion;
	private Date ffasignacion;
	private String cusuario;
	private Date fhingreso;
	private Date fhmodificacion;

	public CgTecnicoCaso() {
	}

	public CgTecnicoCaso(CgTecnicoCasoId id, CgTecnico cgTecnico,
			TbUnidad tbUnidad, CgCaso cgCaso, CgEtapa cgEtapa,
			Date fiasignacion, String cusuario, Date fhingreso,
			Date fhmodificacion) {
		this.id = id;
		this.cgTecnico = cgTecnico;
		this.tbUnidad = tbUnidad;
		this.cgCaso = cgCaso;
		this.cgEtapa = cgEtapa;
		this.fiasignacion = fiasignacion;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
	}

	public CgTecnicoCaso(CgTecnicoCasoId id, CgTecnico cgTecnico,
			TbUnidad tbUnidad, CgCaso cgCaso, CgEtapa cgEtapa,
			Date fiasignacion, Date ffasignacion, String cusuario,
			Date fhingreso, Date fhmodificacion) {
		this.id = id;
		this.cgTecnico = cgTecnico;
		this.tbUnidad = tbUnidad;
		this.cgCaso = cgCaso;
		this.cgEtapa = cgEtapa;
		this.fiasignacion = fiasignacion;
		this.ffasignacion = ffasignacion;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "nit", column = @Column(name = "NIT", nullable = false, length = 14)),
			@AttributeOverride(name = "ncaso", column = @Column(name = "N_CASO", nullable = false, precision = 10, scale = 0)),
			@AttributeOverride(name = "cetapa", column = @Column(name = "C_ETAPA", nullable = false, precision = 5, scale = 0)) })
	public CgTecnicoCasoId getId() {
		return this.id;
	}

	public void setId(CgTecnicoCasoId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "NIT", nullable = false, insertable = false, updatable = false)
	public CgTecnico getCgTecnico() {
		return this.cgTecnico;
	}

	public void setCgTecnico(CgTecnico cgTecnico) {
		this.cgTecnico = cgTecnico;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_UNIDAD", nullable = false)
	public TbUnidad getTbUnidad() {
		return this.tbUnidad;
	}

	public void setTbUnidad(TbUnidad tbUnidad) {
		this.tbUnidad = tbUnidad;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "N_CASO", nullable = false, insertable = false, updatable = false)
	public CgCaso getCgCaso() {
		return this.cgCaso;
	}

	public void setCgCaso(CgCaso cgCaso) {
		this.cgCaso = cgCaso;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_ETAPA", nullable = false, insertable = false, updatable = false)
	public CgEtapa getCgEtapa() {
		return this.cgEtapa;
	}

	public void setCgEtapa(CgEtapa cgEtapa) {
		this.cgEtapa = cgEtapa;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FI_ASIGNACION", nullable = false, length = 7)
	public Date getFiasignacion() {
		return this.fiasignacion;
	}

	public void setFiasignacion(Date fiasignacion) {
		this.fiasignacion = fiasignacion;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FF_ASIGNACION", length = 7)
	public Date getFfasignacion() {
		return this.ffasignacion;
	}

	public void setFfasignacion(Date ffasignacion) {
		this.ffasignacion = ffasignacion;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_MODIFICACION", nullable = false, length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

}
